package com.thinkcube.edutainment.service.viewitem;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.thinkcube.edutainment.R;
import com.thinkcube.edutainment.domain.data.PostData;

/**
 * Shanuka @Cyberlmj 3:08:30 PM Email: shanuka.gayashan@cyberlmj.com
 */
@EViewGroup(R.layout.forum_post_detal_item)
public class ForumPostDetailItem extends RelativeLayout {

	@ViewById(R.id.forum_post)
	TextView forumPost;
	
	@ViewById(R.id.post_on)
	TextView postOn;
	
	

	public ForumPostDetailItem(final Context context) {
		super(context);

	}

	public ForumPostDetailItem(final Context context, final AttributeSet attrs) {
		super(context, attrs);
	}

	public void bind(final PostData postData) {
		
		System.out.println("Likes------->"+postData.getLikeCount());
		
		
		
		forumPost.setText(postData.getBody());
		
		postOn.setText(postData.getUserFullName()+" on "+postData.getPostedDate());

	}
}
